<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head>
<!-- saved from url=(0035)http://acm.uva.es/p/v101/10110.html -->
<!-- saved from url=(0022)http://internet.e-mail --><title>Light, more light</title>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<meta content="MSHTML 6.00.2712.300" name="GENERATOR">
<meta content="S. M. Mahbub Murshed" name="Author">
<meta content="Light, more light" name="Description"><!--Converted with LaTeX2HTML 96.1 (Feb 5, 1996) by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds --></head><body bgcolor="#ffffff" lang="EN">&nbsp; 
<center>
<table bgcolor="#0060f0">
  <tbody>
  <tr>
    <td><a name="SECTION0001000000000000000000"></a><b><font color="#c0ffff"><font size="+2">Light, more light</font></font></b></td></tr></tbody></table></center>
<h2><a name="SECTION0001002000000000000000"></a><font color="#0070e8">The 
Problem</font></h2>There is man named "mabu" for switching on-off light in our 
University. He switches on-off the lights in a corridor. Every bulb has its own 
toggle switch. That is, if it is pressed then the bulb turns on. Another press 
will turn it off. To save power consumption (or may be he is mad or something 
else) he does a peculiar thing. If in a corridor there is `n' bulbs, he walks 
along the corridor back and forth `n' times and in i'th walk he toggles only the 
switches whose serial is divisable by i. He does not press any switch when 
coming back to his initial position. A i'th walk is defined as going down the 
corridor (while doing the peculiar thing) and coming back again. 
<p>Now you have to determine what is the final condition of the last bulb. Is it 
on or off? <br>&nbsp; 
</p><h2><a name="SECTION0001003000000000000000"></a><font color="#0070e8">The 
Input</font></h2>The input will be an integer indicating the n'th bulb in a 
corridor. Which is less then or equals 2^32-1. A zero indicates the end of 
input. You should not process this input. 
<h2><a name="SECTION0001004000000000000000"></a><font color="#0070e8">The 
Output</font></h2>Output "<tt>yes</tt>" if the light is on otherwise 
"<tt>no</tt>" , in a single line. 
<h2><a name="SECTION0001005000000000000000"></a><font color="#0070e8">Sample 
Input</font></h2><pre>3
6241
8191
0</pre>
<h2><a name="SECTION0001006000000000000000"></a><font color="#0070e8">Sample 
Output</font></h2><pre>no
yes
no
</pre>
<hr>
<i>Sadi Khan</i> <br><i>Suman Mahbub</i> <br><i>01-04-2001</i> </body></html>